package com.aspose.cells;

class zbil extends zck {
   zbil(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
      switch(this.e.b) {
      case 1:
      default:
         break;
      case 2:
         com.aspose.cells.b.a.b.a.zi var5 = new com.aspose.cells.b.a.b.a.zi(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, this.e.S().i());
         this.a.b(var5);
         break;
      case 3:
         com.aspose.cells.b.a.b.a.zi var6 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, -1.0F, this.e.S().h(), this.e.S().i());
         this.a.b(var6);
         break;
      case 4:
         com.aspose.cells.b.a.b.a.zi var7 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, 1.0F, this.e.S().h(), 0.0F);
         this.a.b(var7);
      }

   }

   com.aspose.cells.b.a.b.a.ze a(com.aspose.cells.b.a.b.zq var1) {
      com.aspose.cells.b.a.b.a.ze var2 = new com.aspose.cells.b.a.b.a.ze();
      float var3 = 0.0F;
      float var4 = 0.0F;
      float var5 = 0.0F;
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var3 = this.e.r() * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
            var4 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 60000.0F;
            var5 = this.e.r() * com.aspose.cells.b.a.ze.a(this.e.m.a.get(2)) / 100000.0F;
         } else {
            var3 = this.e.r() * 23520.0F / 100000.0F;
            var4 = 110.0F;
            var5 = this.e.r() * 11759.0F / 100000.0F;
         }
      } else {
         var3 = this.e.r() * 23520.0F / 100000.0F;
         var4 = 110.0F;
         var5 = this.e.r() * 11759.0F / 100000.0F;
      }

      float var6 = 0.0F;
      if (var4 < 90.0F) {
         var6 = (float)zbif.a((double)var4);
      } else {
         var6 = (float)zbif.a((double)(180.0F - var4));
      }

      float var7 = 0.135F * var1.h();
      float var8 = var1.h() - var7;
      float var9 = (var1.i() - var3 * 2.0F - var5) / 2.0F;
      float var10 = var1.i() - var9;
      float var11 = 0.0F;
      float var12 = 0.0F;
      var11 = (float)((double)var3 * Math.cos((double)var6));
      var12 = (float)((double)var3 * Math.sin((double)var6));
      float var14 = 0.0F;
      float var15 = 0.0F;
      var15 = var9 - var11;
      var14 = (float)((double)var15 / Math.tan((double)var6));
      float var16 = 0.0F;
      float var17 = 0.0F;
      var16 = var1.i() - var9;
      var17 = (float)((double)var16 / Math.tan((double)var6));
      float var18 = (var1.h() - var12 - var17) / 2.0F;
      float var19 = 0.0F;
      float var20 = 0.0F;
      float var21 = 0.0F;
      float var22 = 0.0F;
      float var23 = 0.0F;
      float var24 = 0.0F;
      float var25 = 0.0F;
      float var26 = 0.0F;
      float var27 = 0.0F;
      if (var4 < 90.0F) {
         var19 = var1.h() - var18 - (var3 * 2.0F + var5 + var15) / (float)Math.tan((double)var6);
         var20 = var1.h() - var18 - (var15 + var3 + var5) / (float)Math.tan((double)var6);
         var21 = var1.h() - var18 - (var15 + var3) / (float)Math.tan((double)var6);
         var22 = var1.h() - var18 - var15 / (float)Math.tan((double)var6);
         var23 = var1.h() - var18;
         var27 = (var15 + 2.0F * var3 + var5) / (float)Math.tan((double)var6) + var18;
         var24 = (var15 + var3 * 2.0F + var5) / (float)Math.tan((double)var6) + var18;
         var25 = (var15 + var3 + var5) / (float)Math.tan((double)var6) + var18;
         var26 = (var15 + var3) / (float)Math.tan((double)var6) + var18;
      } else {
         var19 = var1.h() - var18 - var14;
         var20 = var1.h() - var18 - (var15 + var3) / (float)Math.tan((double)var6);
         var21 = var1.h() - var18 - (var15 + var3 + var5) / (float)Math.tan((double)var6);
         var22 = var1.h() - var18 - (var15 + var3 * 2.0F + var5) / (float)Math.tan((double)var6);
         var23 = var1.h() - var18 - (var15 + var3 * 2.0F + var5 + var9) / (float)Math.tan((double)var6);
         var24 = (var15 + var3 * 2.0F + var5) / (float)Math.tan((double)var6) + var18;
         var25 = (var15 + var3) / (float)Math.tan((double)var6) + var18;
         var26 = (var15 + var3 + var5) / (float)Math.tan((double)var6) + var18;
      }

      com.aspose.cells.b.a.b.zo[] var28 = new com.aspose.cells.b.a.b.zo[20];
      if (var3 > 0.0F) {
         if (var4 < 90.0F) {
            var28[0] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9);
            var28[1] = new com.aspose.cells.b.a.b.zo(this.g + var18 + var14, this.h + var9);
            var28[2] = new com.aspose.cells.b.a.b.zo(this.g + var18, this.h + var11);
            var28[3] = new com.aspose.cells.b.a.b.zo(this.g + var18 + var12, this.h);
            var28[4] = new com.aspose.cells.b.a.b.zo(this.g + var19 + var14, this.h + var9);
            var28[5] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9);
            var28[6] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + var3);
            var28[7] = new com.aspose.cells.b.a.b.zo(this.g + var20 + var14, this.h + var9 + var3);
            var28[8] = new com.aspose.cells.b.a.b.zo(this.g + var21 + var14, this.h + var9 + var3 + var5);
            var28[9] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + var3 + var5);
            var28[10] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + 2.0F * var3 + var5);
            var28[11] = new com.aspose.cells.b.a.b.zo(this.g + var22 + var14, this.h + var9 + 2.0F * var3 + var5);
            var28[12] = new com.aspose.cells.b.a.b.zo(this.g + var23 + var14, this.h + var1.i() - var11);
            var28[13] = new com.aspose.cells.b.a.b.zo(this.g + var1.h() - var18 - var12 + var14, this.h + var1.i());
            var28[14] = new com.aspose.cells.b.a.b.zo(this.g + var27, this.h + var10);
            var28[15] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var10);
            var28[16] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9 + var3 + var5);
            var28[17] = new com.aspose.cells.b.a.b.zo(this.g + var25, this.h + var9 + var3 + var5);
            var28[18] = new com.aspose.cells.b.a.b.zo(this.g + var26, this.h + var9 + var3);
            var28[19] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9 + var3);
         } else {
            var28[0] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9);
            var28[1] = new com.aspose.cells.b.a.b.zo(this.g + var24 - var14, this.h + var9);
            var28[2] = new com.aspose.cells.b.a.b.zo(this.g + var18 + var17, this.h);
            var28[3] = new com.aspose.cells.b.a.b.zo(this.g + var18 + var17 + var12, this.h + var11);
            var28[4] = new com.aspose.cells.b.a.b.zo(this.g + var19, this.h + var9);
            var28[5] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9);
            var28[6] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + var3);
            var28[7] = new com.aspose.cells.b.a.b.zo(this.g + var20, this.h + var9 + var3);
            var28[8] = new com.aspose.cells.b.a.b.zo(this.g + var21, this.h + var9 + var3 + var5);
            var28[9] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + var3 + var5);
            var28[10] = new com.aspose.cells.b.a.b.zo(this.g + var8, this.h + var9 + 2.0F * var3 + var5);
            var28[11] = new com.aspose.cells.b.a.b.zo(this.g + var22, this.h + var9 + 2.0F * var3 + var5);
            var28[12] = new com.aspose.cells.b.a.b.zo(this.g + var23, this.h + var1.i());
            var28[13] = new com.aspose.cells.b.a.b.zo(this.g + var18 - var14, this.h + var1.i() - var11);
            var28[14] = new com.aspose.cells.b.a.b.zo(this.g + var18, this.h + var10);
            var28[15] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var10);
            var28[16] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9 + var3 + var5);
            var28[17] = new com.aspose.cells.b.a.b.zo(this.g + var25 - var14, this.h + var9 + var3 + var5);
            var28[18] = new com.aspose.cells.b.a.b.zo(this.g + var26 - var14, this.h + var9 + var3);
            var28[19] = new com.aspose.cells.b.a.b.zo(this.g + var7, this.h + var9 + var3);
         }

         var2.a(var28[0], var28[1]);
         var2.a(var28[1], var28[2]);
         var2.a(var28[2], var28[3]);
         var2.a(var28[3], var28[4]);
         var2.a(var28[4], var28[5]);
         var2.a(var28[5], var28[6]);
         var2.a(var28[6], var28[7]);
         var2.a(var28[7], var28[8]);
         var2.a(var28[8], var28[9]);
         var2.a(var28[9], var28[10]);
         var2.a(var28[10], var28[11]);
         var2.a(var28[11], var28[12]);
         var2.a(var28[12], var28[13]);
         var2.a(var28[13], var28[14]);
         var2.a(var28[15], var28[16]);
         var2.a(var28[16], var28[17]);
         var2.a(var28[17], var28[18]);
         var2.a(var28[18], var28[19]);
         var2.a(var28[19], var28[0]);
         var2.i();
      }

      return var2;
   }
}
